package com.zhoujian.Observer.asyc;


//修改为异步
public class AppClient implements Observer {
    @Override
    public void update(float newTemperature) {

        try {
            Thread.sleep(5000);//这样阻塞5秒
        } catch (InterruptedException e) {
            throw new RuntimeException(e);
        }
        System.out.println("app 更新了温度，现在的温度是："+ newTemperature);
    }
}
